package com.chagee.store.operation.server.model.param;

import com.fasterxml.jackson.annotation.JsonFormat;
import lombok.Data;

import javax.validation.Valid;
import javax.validation.constraints.NotBlank;
import java.io.Serializable;
import java.time.LocalDateTime;

/**
 * @author: yuanzhiqin
 * @description:
 * @date: 2024/6/27.
 */
@Data
public class AppealReviewerListParam implements Serializable {

	/**
	 * 审核人名称
	 */
	private String reveiwerName;

	/**
	 * 所属子公司id
	 */
	private String companyId;

	/**
	 * 所属子公司
	 */
	private String companyName;

	/**
	 * 创建人
	 */
	private String createUser;

	/**
	 * 创建时间start
	 */
	@JsonFormat(shape = JsonFormat.Shape.STRING, pattern = "yyyy-MM-dd HH:mm")
	private LocalDateTime createTimeStart;

	/**
	 * 创建时间end
	 */
	@JsonFormat(shape = JsonFormat.Shape.STRING, pattern = "yyyy-MM-dd HH:mm")
	private LocalDateTime createTimeEnd;

	public void setCreateTimeStart(LocalDateTime createTimeStart) {
		if (createTimeStart == null) {
			return;
		}
		this.createTimeStart = createTimeStart.withSecond(0).withNano(0);
	}

	public void setCreateTimeEnd(LocalDateTime createTimeEnd) {
		if (createTimeEnd == null) {
			return;
		}
		this.createTimeEnd = createTimeEnd.plusMinutes(1).withSecond(0).withNano(0);
	}
}
